package com.zengzhi.mydesignmode.strategymode;

/**
 * @author xiejiawei
 * @Date 2021-08-14
 * @Time 22:01
 * 绿头鸭叫的类
 */
public class MallardDuck extends Duck {
    MallardDuck(){
        quackBehavior = new Quack();
        flyBehavior = new FlyWithWings();
    }
    /**
     * 显示行为的方法
     */
    @Override
    void disPlay() {
        System.out.println("I'm a real Mallard duck");

    }
}
